package com.wd.live.view.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.ViewModel
import com.wd.live.R
import com.wd.live.databinding.FragmentSexBinding

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

class SexFragment : Fragment() {
    private lateinit var binding: FragmentSexBinding
    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        binding = FragmentSexBinding.inflate(layoutInflater)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        binding.checkboxSexMan.setOnClickListener {
            binding.checkboxSexMan.setBackgroundResource(R.drawable.item05)
            binding.checkboxSexNv.setBackgroundResource(R.drawable.item04)
        }
        binding.checkboxSexNv.setOnClickListener {
            binding.checkboxSexMan.setBackgroundResource(R.drawable.item04)
            binding.checkboxSexNv.setBackgroundResource(R.drawable.item05)
        }
    }

}